package main

import "fmt"

func Add(a, b int) int {
	var ret = a + b
	fmt.Printf("the sum of %d and %d is %d\n", a, b, ret)
	return ret
}

func main() {

	fmt.Println("hello world!")
	fmt.Print("33333")

	var input string
	_, err := fmt.Scanln(&input)
	if err != nil {
		return
	}
	fmt.Printf("你输入是：%s", input)
	var c = Add(3, 5)

	fmt.Println(c)

	const x int = 110

	const s string = "hello"
	fmt.Println(x)
	fmt.Println(s)

	var r = '你'
	fmt.Println(r)

	y := string(r)
	fmt.Println(y)

	var a [5]int

	fmt.Println(a)

	slice1 := []int{1, 2, 3, 4, 5}
	slice2 := []int{5, 4, 3}
	copy(slice2, slice1)

	fmt.Println(slice2)

	const elementCount = 1000
	srcData := make([]int, elementCount)
	for i := 0; i < elementCount; i++ {
		srcData[i] = i
	}
	refData := srcData
	copyData := make([]int, elementCount)
	copy(copyData, srcData)
	srcData[0] = 999
	fmt.Println(refData[0])

	//for index, value := range refData {
	//	fmt.Printf("Index: %d value:%d \n", index, value)
	//}

	//fmt.Println(srcData)
	//fmt.Println(copyData)

	m := map[string]int{
		"kiek": 1,
		"kkkk": 2,
	}
	fmt.Println(m)

}
